package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertyWarehouseMapper;
import com.ruoyi.system.domain.PropertyWarehouse;
import com.ruoyi.system.service.IPropertyWarehouseService;

/**
 * 资产仓库管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-08
 */
@Service
public class PropertyWarehouseServiceImpl implements IPropertyWarehouseService 
{
    @Autowired
    private PropertyWarehouseMapper propertyWarehouseMapper;

    /**
     * 查询资产仓库管理
     * 
     * @param id 资产仓库管理主键
     * @return 资产仓库管理
     */
    @Override
    public PropertyWarehouse selectPropertyWarehouseById(Long id)
    {
        return propertyWarehouseMapper.selectPropertyWarehouseById(id);
    }

    /**
     * 查询资产仓库管理列表
     * 
     * @param propertyWarehouse 资产仓库管理
     * @return 资产仓库管理
     */
    @Override
    public List<PropertyWarehouse> selectPropertyWarehouseList(PropertyWarehouse propertyWarehouse)
    {
        return propertyWarehouseMapper.selectPropertyWarehouseList(propertyWarehouse);
    }

    /**
     * 新增资产仓库管理
     * 
     * @param propertyWarehouse 资产仓库管理
     * @return 结果
     */
    @Override
    public int insertPropertyWarehouse(PropertyWarehouse propertyWarehouse)
    {
        propertyWarehouse.setCreateTime(DateUtils.getNowDate());
        return propertyWarehouseMapper.insertPropertyWarehouse(propertyWarehouse);
    }

    /**
     * 修改资产仓库管理
     * 
     * @param propertyWarehouse 资产仓库管理
     * @return 结果
     */
    @Override
    public int updatePropertyWarehouse(PropertyWarehouse propertyWarehouse)
    {
        propertyWarehouse.setUpdateTime(DateUtils.getNowDate());
        return propertyWarehouseMapper.updatePropertyWarehouse(propertyWarehouse);
    }

    /**
     * 批量删除资产仓库管理
     * 
     * @param ids 需要删除的资产仓库管理主键
     * @return 结果
     */
    @Override
    public int deletePropertyWarehouseByIds(Long[] ids)
    {
        return propertyWarehouseMapper.deletePropertyWarehouseByIds(ids);
    }

    /**
     * 删除资产仓库管理信息
     * 
     * @param id 资产仓库管理主键
     * @return 结果
     */
    @Override
    public int deletePropertyWarehouseById(Long id)
    {
        return propertyWarehouseMapper.deletePropertyWarehouseById(id);
    }
}
